/*
 * Projet Java / UML -- Trombinoscope - Février / Avril 2012
 * Virginie Messe -- William Huber
 */
package dbtest;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;

import mvc_model.*;
import outils.PersonneDAO;
import outils.PromotionDAO;

/**
 *
 * @author Virginie Messe & William Huber
 */
public class ListerPromotionsTest1 {
    private PersonneDAO persDAOT;
    private PromotionDAO promDAOT;
    
    @Test
    public void fLPT1_1() throws ClassNotFoundException {
        Class.forName("com.mysql.jdbc.Driver");
        Promotion promo = new Promotion();
        ArrayList resAL = new ArrayList<Promotion>();
        
        
        resAL = promo.listerPromotions();
        Iterator<Promotion> iter = resAL.iterator();
        
        while (iter.hasNext()) {
            Promotion promo_une = iter.next();
            System.out.println("fLPT1_1 : " + promo_une.getClasse() 
                    + " " + promo_une.getAnneeScolaire());
        }
        
        
    }
    
}
